package routers

import (
	"familytree/middleWare"

	"github.com/gin-gonic/gin"
)

func sysNoCheckRoleRouter(r *gin.RouterGroup) {
	r = r.Group("/apis")
	peopleRouter(r)
	connectionRouter(r)

}

func InitRouter() *gin.Engine {
	r := gin.New()
	r.Use(gin.Logger())
	r.Use(gin.Recovery())
	r.Use(middleWare.Cors())
	g := r.Group("/familytree")

	sysNoCheckRoleRouter(g)

	return r
}
